package cn.hesion.mergefile.step2;
/**
 * ClassName: CommentPartitioner <br/>
 * Description: <br/>
 * date: 2021/2/4 10:57<br/>
 *
 * @author Hesion<br />
 * @version
 * @since JDK 1.8
 */

import org.apache.hadoop.io.NullWritable;
import org.apache.hadoop.mapreduce.Partitioner;

/**
 * @program: ClientDemo
 * @description:
 * @author: hesion
 * @create: 2021-02-04 10:57
 **/
public class CommentPartitioner extends Partitioner<CommentBean, NullWritable> {
    @Override
    public int getPartition(CommentBean commentBean, NullWritable nullWritable, int i) {
        return commentBean.getCommentStatus();//0,1,2-----对应分区编号，实现差评，好评分离
    }
}
